package com.galeno.zoopeeper;

import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;

import java.io.IOException;

/**
 * @author galeno
 * @Title:
 * @Description:
 * @date 2021/7/319:14
 */
public class JavaDemo4Watch {
  public static void main(String[] args) throws IOException, InterruptedException, KeeperException {
      ZooKeeper zk=new ZooKeeper("galeno01:2181",1000,null);
      byte[] data = zk.getData("/ccc", new Watcher() {
          @Override
          public void process(WatchedEvent event) {

          }
      }, null);
    System.out.println();
  }
}
